using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._3DProximity
{
    /// <summary>
    /// <para>Near 3D</para>
    /// <para>Calculates the three-dimensional distance from each input feature to the nearest feature that resides in one or more near feature classes.</para>
    /// <para>计算从每个输入要素到位于一个或多个邻近要素类中的最近要素的三维距离。</para>
    /// </summary>    
    [DisplayName("Near 3D")]
    public class Near3D : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Near3D()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input feature class whose features will be attributed with information about the nearest feature.</para>
        /// <para>输入要素类，其要素将使用最近要素的信息进行属性化。</para>
        /// </param>
        /// <param name="_near_features">
        /// <para>Near Features</para>
        /// <para>The one or more features whose proximity to the input features will be calculated. If multiple feature classes are specified, an additional field named NEAR_FC will be added to the input feature class to identify which near feature class contained the closest feature.</para>
        /// <para>将计算其与输入要素的接近程度的一个或多个要素。如果指定了多个要素类，则将向输入要素类添加一个名为 NEAR_FC 的附加字段，以识别哪个邻近要素类包含最近的要素。</para>
        /// </param>
        public Near3D(object _in_features, List<object> _near_features)
        {
            this._in_features = _in_features;
            this._near_features = _near_features;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Near 3D";

        public override string CallName => "3d.Near3D";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_features, _near_features, _search_radius, _location.GetGPValue(), _angle.GetGPValue(), _delta.GetGPValue(), _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input feature class whose features will be attributed with information about the nearest feature.</para>
        /// <para>输入要素类，其要素将使用最近要素的信息进行属性化。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Near Features</para>
        /// <para>The one or more features whose proximity to the input features will be calculated. If multiple feature classes are specified, an additional field named NEAR_FC will be added to the input feature class to identify which near feature class contained the closest feature.</para>
        /// <para>将计算其与输入要素的接近程度的一个或多个要素。如果指定了多个要素类，则将向输入要素类添加一个名为 NEAR_FC 的附加字段，以识别哪个邻近要素类包含最近的要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Near Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _near_features { get; set; }


        /// <summary>
        /// <para>Search Radius</para>
        /// <para>The maximum distance for which the nearest features from a given input will be determined. If no value is specified, the nearest feature at any distance will be determined.</para>
        /// <para>将确定与给定输入的最近要素的最大距离。如果未指定值，则将确定任意距离的最近要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_radius { get; set; } = null;


        /// <summary>
        /// <para>Location</para>
        /// <para><xdoc>
        ///   <para>Determines whether the coordinates of the nearest point in the input and near feature will be added to the input's attribute table.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The coordinates are not added to the input feature. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The coordinates are added to the input feature.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否将输入和近要素中最近点的坐标添加到输入的属性表中。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 坐标不添加到输入要素中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 坐标将添加到输入要素中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Location")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _location_value _location { get; set; } = _location_value._false;

        public enum _location_value
        {
            /// <summary>
            /// <para>LOCATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("LOCATION")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_LOCATION</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_LOCATION")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Angle</para>
        /// <para><xdoc>
        ///   <para>Determines whether the horizontal arithmetic angle and vertical angle between the input feature and the nearest feature will be added to the input attribute table.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—The angles will not be added to the input's attribute table. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—The horizontal arithmetic angle and vertical angle will be added to the NEAR_ANG_H and NEAR_ANG_V fields in the input's attribute table.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否将输入要素与最近要素之间的水平算术角度和垂直角度添加到输入属性表中。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 角度不会添加到输入的属性表中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中—水平算术角度和垂直角度将添加到输入属性表中的NEAR_ANG_H和NEAR_ANG_V字段中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Angle")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _angle_value _angle { get; set; } = _angle_value._false;

        public enum _angle_value
        {
            /// <summary>
            /// <para>ANGLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ANGLE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_ANGLE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_ANGLE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Delta</para>
        /// <para><xdoc>
        ///   <para>Determines whether the distances along the X, Y, and Z axes between the input feature and the nearest feature will be added to the input attribute table.</para>
        ///   <bulletList>
        ///     <bullet_item>Unchecked—No distances will be added to the input attribute table. This is the default.</bullet_item><para/>
        ///     <bullet_item>Checked—Distances along the X, Y, and Z axes will be calculated in the NEAR_DELTX, NEAR_DELTY, and NEAR_DELTZ fields.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>确定是否将输入要素与最近要素之间沿 X、Y 和 Z 轴的距离添加到输入属性表中。</para>
        ///   <bulletList>
        ///     <bullet_item>未选中 - 不会将距离添加到输入属性表中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>选中 - 沿 X、Y 和 Z 轴的距离将在 NEAR_DELTX、NEAR_DELTY 和 NEAR_DELTZ 字段中计算。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Delta")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _delta_value _delta { get; set; } = _delta_value._false;

        public enum _delta_value
        {
            /// <summary>
            /// <para>DELTA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DELTA")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NO_DELTA</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NO_DELTA")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public Near3D SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}